package com.sunyard.domee.common.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 优惠类型
 * @author jinrao
 */
@Getter
@RequiredArgsConstructor
public enum CouponTypeEnum {
    OVER(1,"满减券"),
    CASH(2,"现金券"),
    DISCOUNT(3,"折扣"),

    ;

    private final Integer code;
    private final String message;

    public static CouponTypeEnum getEnumByCode(Integer code) {
        CouponTypeEnum[] enums = CouponTypeEnum.values();
        for (CouponTypeEnum exportOrderStatusEnum : enums) {
            if (exportOrderStatusEnum.getCode().equals(code)) {
                return exportOrderStatusEnum;
            }
        }
        return null;
    }
}
